package com.lizhen.j2eepattern.servicelocatorpattern;

public class ServiceLocatorPattern {
    public ServiceLocatorPattern() {
    }

    public static void main(String[] args) {
        Service service = ServiceLocator.getService("Service1");
        service.execute();
        service = ServiceLocator.getService("Service2");
        service.execute();
        service = ServiceLocator.getService("Service1");
        service.execute();
        service = ServiceLocator.getService("Service2");
        service.execute();
    }
}
